package com.fgcs.member.controller;


import com.fgcs.member.pojo.Whole;
import com.fgcs.member.service.WholeService;
import com.fgcs.pojo.JsonResult;
import com.fgcs.pojo.PageObject;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/whole")
public class WholeController {
    @Autowired
    private WholeService wholeService;

    @GetMapping("/doFindPageObjects")
    public JsonResult doFindPageObjects(@Param("name") String name,@Param("pageCurrent") Integer pageCurrent){
        PageObject<Whole> pageObject = wholeService.findPageObjects(name,pageCurrent);
        return new JsonResult(pageObject);
    }
}
